Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

assertTemplateName returns too early #59

@SorX14

Description

@SorX14

assertTemplateName appears to return too early, and does not recursively search all child templates (see below).

<?php

public function myAction()
{
	$vm = new ViewModel();

	$child1 = (new ViewModel())->setTemplate('foo');
	$child2 = (new ViewModel())->setTemplate('bar');

	$vm->addChild($child1);
	$vm->addChild($child2);

	return $vm;
}

...

class testCase extends AbstractHttpControllerTestCase {
	
	public function testMyAction()
	{
		$this->dispatch('/my/action', 'GET', []);
		$this->assertTemplateName('foo'); // <-- true
		$this->assertTemplateName('bar'); // <-- false
	}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions