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