This class represents every file compiled in a project Every file may contain a class or an interface
コード例 #1
0
 public function testExtendsClassThatDoesNotExist()
 {
     $config = new Config();
     $logger = $this->getMockBuilder('Zephir\\Logger')->disableOriginalConstructor()->getMock();
     $compiler = new Compiler($config, $logger, new Backend($config));
     $topStatement = array('name' => 'myClass', 'extends' => array(array('value' => 'doesNotExist')));
     $sUT = new sUT('myClass', 'myClass.zep', $config, $logger);
     $sUT->preCompileInterface('myNamespace', $topStatement, null);
     $logger->expects($this->once())->method('warning');
     $sUT->checkDependencies($compiler);
 }
コード例 #2
0
ファイル: ClassFile.php プロジェクト: zhao5908/zephir
 public function __construct($config, CompilerFile $class)
 {
     $this->compilerFile = $class;
     $this->class = $class->getClassDefinition();
 }