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

Commit

Permalink
Merge branch 'feature/phpunit-assert-type-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Aug 25, 2011
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions test/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ public function testFinderMethodsShouldWorkWithCustomProperties()
$nav = $this->_getFindByNavigation();

$found = $nav->findOneBy('page2', 'page2');
$this->assertType('Zend\Navigation\AbstractPage', $found);
$this->assertInstanceOf('Zend\\Navigation\\AbstractPage', $found);
$this->assertEquals('Page 2', $found->getLabel());
}

Expand All @@ -773,7 +773,7 @@ public function testFindOneByShouldReturnOnlyOnePage()
$nav = $this->_getFindByNavigation();

$found = $nav->findOneBy('id', 'page_2_and_3');
$this->assertType('Zend\Navigation\AbstractPage', $found);
$this->assertInstanceOf('Zend\\Navigation\\AbstractPage', $found);
$this->assertEquals('Page 2', $found->getLabel());
}

Expand Down Expand Up @@ -817,15 +817,15 @@ public function testFindByShouldDefaultToFindOneBy()
$nav = $this->_getFindByNavigation();

$found = $nav->findBy('id', 'page_2_and_3');
$this->assertType('Zend\Navigation\AbstractPage', $found);
$this->assertInstanceOf('Zend\\Navigation\\AbstractPage', $found);
}

public function testFindOneByMagicMethodNativeProperty()
{
$nav = $this->_getFindByNavigation();

$found = $nav->findOneById('page_2_and_3');
$this->assertType('Zend\Navigation\AbstractPage', $found);
$this->assertInstanceOf('Zend\\Navigation\\AbstractPage', $found);
$this->assertEquals('Page 2', $found->getLabel());
}

Expand All @@ -834,7 +834,7 @@ public function testFindOneByMagicMethodCustomProperty()
$nav = $this->_getFindByNavigation();

$found = $nav->findOneBypage2('page2');
$this->assertType('Zend\Navigation\AbstractPage', $found);
$this->assertInstanceOf('Zend\\Navigation\\AbstractPage', $found);
$this->assertEquals('Page 2', $found->getLabel());
}

Expand Down Expand Up @@ -891,7 +891,7 @@ public function testFindByMagicMethodIsEquivalentToFindOneBy()
$nav = $this->_getFindByNavigation();

$found = $nav->findById('page_2_and_3');
$this->assertType('Zend\Navigation\AbstractPage', $found);
$this->assertInstanceOf('Zend\\Navigation\\AbstractPage', $found);
$this->assertEquals('Page 2', $found->getLabel());
}

Expand Down
10 changes: 5 additions & 5 deletions test/PageFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function testDetectUriPage()
'uri' => '#'
));

$this->assertType('Zend\Navigation\Page\Uri', $page);
$this->assertInstanceOf('Zend\\Navigation\\Page\\Uri', $page);
}

public function testMvcShouldHaveDetectionPrecedence()
Expand All @@ -85,7 +85,7 @@ public function testMvcShouldHaveDetectionPrecedence()
'uri' => '#'
));

$this->assertType('Zend\Navigation\Page\Mvc', $page);
$this->assertInstanceOf('Zend\\Navigation\\Page\\Mvc', $page);
}

public function testSupportsMvcShorthand()
Expand All @@ -97,7 +97,7 @@ public function testSupportsMvcShorthand()
'controller' => 'index'
));

$this->assertType('Zend\Navigation\Page\Mvc', $mvcPage);
$this->assertInstanceOf('Zend\\Navigation\\Page\\Mvc', $mvcPage);
}

public function testSupportsUriShorthand()
Expand All @@ -108,7 +108,7 @@ public function testSupportsUriShorthand()
'uri' => 'http://www.example.com/'
));

$this->assertType('Zend\Navigation\Page\Uri', $uriPage);
$this->assertInstanceOf('Zend\\Navigation\\Page\\Uri', $uriPage);
}

public function testSupportsCustomPageTypes()
Expand All @@ -118,7 +118,7 @@ public function testSupportsCustomPageTypes()
'label' => 'My Custom Page'
));

return $this->assertType('ZendTest\Navigation\TestAsset\Page', $page);
return $this->assertInstanceOf('ZendTest\\Navigation\\TestAsset\\Page', $page);
}

public function testShouldFailForInvalidType()
Expand Down

0 comments on commit 1a2506a

Please sign in to comment.