getMapping() as $classname) { if (substr_count($classname, '\\')) { self::assertTrue(class_exists($classname) || interface_exists($classname), 'mapping is wrong, class does not exists in project: ' . $classname); } } } public function testReplace() { $input = <<<'STRING' do(); $fooobjPHPExcel->do(); $objPHPExcel->do(); $this->objPHPExcel->do(); $this->PHPExcel->do(); return \PHPExcel_Cell::stringFromColumnIndex(9); } } STRING; $expected = <<<'STRING' do(); $fooobjPHPExcel->do(); $objPHPExcel->do(); $this->objPHPExcel->do(); $this->PHPExcel->do(); return \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex(9); } } STRING; $migrator = new Migrator(); self::assertSame($expected, $migrator->replace($input)); } }