PhpMigration\Changes\AbstractIntroducedTest::testNewConst PHP Method

testNewConst() public method

public testNewConst ( )
    public function testNewConst()
    {
        // Not-new
        $code = $this->genDefine('NOTNEW');
        $this->assertNotSpot($code);
        $table = TestHelper::fetchProperty($this->change, 'constTable');
        foreach ($table as $name => $dummy) {
            // Normal name
            $code = $this->genDefine($name);
            $this->assertHasSpot($code);
            // Case Insensitive name
            $code = $this->genDefine(strtolower($name));
            $this->assertNotSpot($code);
        }
        // #Issue 7: First argument not a string
        $this->assertNotSpot('define(DUMMY, 0);');
        $this->assertNotSpot('define(123, 0);');
        $this->assertNotSpot('define($dummy, 0);');
    }