コード例 #1
0
ファイル: InheritanceTest.php プロジェクト: renanbr/phpact
 public function testConstantOverwritten()
 {
     $parent = self::$parentUnit->getConstants();
     $child = self::$childUnit->getConstants();
     self::assertTrue($parent->has('OVERWRITTEN'), 'constant not found');
     self::assertTrue($child->has('OVERWRITTEN'), 'constant not found');
     self::assertCount(1, $parent);
     self::assertCount(1, $child);
     self::assertEquals('array', $parent->get('OVERWRITTEN')->getType());
     self::assertEquals('int', $child->get('OVERWRITTEN')->getType());
 }
コード例 #2
0
ファイル: UnitComparator.php プロジェクト: renanbr/phpact
 private function compareConstants()
 {
     $comparator = new ConstantCollectionComparator();
     $comparator->setDifferences($this->differences);
     $comparator->setEventDispatcher($this->eventDispatcher);
     $comparator->compare($this->base->getConstants(), $this->challenger->getConstants());
 }