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