Exemple #1
0
 function testCanBridgeNamespacedClass()
 {
     $mockMatcher = new IsInstanceOf(MockMe::class);
     $typeBridge = HamcrestTypeBridge::argOfTypeThat(MockMe::class, $mockMatcher);
     $this->assertThat($typeBridge, $this->isInstanceOf(MockMe::class));
 }
Exemple #2
0
/**
 * @param $type
 * @param Matcher $matcher
 * @return Object
 */
function argOfTypeThat($type, Matcher $matcher)
{
    return HamcrestTypeBridge::argOfTypeThat($type, $matcher);
}
 /**
  * @expectedException PHPUnit_Framework_Error
  * @expectedExceptionCode E_USER_ERROR
  */
 function testCannotBridgeFinalType()
 {
     HamcrestTypeBridge::argOfTypeThat(FinalClass::class, anArray());
 }