Пример #1
0
 /**
  * @covers \PHP\Manipulator\AHelper::findTokens
  */
 public function testFindTokensThrowsExceptionIfFinderIstNotValidFinder()
 {
     $abstractHelper = new AHelper();
     $token = Token::factory(array(T_WHITESPACE, "\n"));
     $container = new TokenContainer();
     $constraint = new \stdClass();
     try {
         $abstractHelper->findTokens($constraint, $token, $container);
         $this->fail('Expected exception not thrown');
     } catch (\Exception $e) {
         $this->assertEquals('finder is not instance of PHP\\Manipulator\\TokenFinder', $e->getMessage(), 'Wrong exception message');
     }
 }