/** * Test contents in autoload generated */ public function testContentsInAutoloadGenerated() { $this->clean(); $this->setUpMethodCalled(); $this->autoregister->activate($this->composer, $this->interface); $this->autoregister->moveFile($this->event); $this->autoregister->run($this->event); $this->finder->files()->in(static::VENDOR_DIR); /** @var SplFileInfo $file */ foreach ($this->finder as $file) { if (static::COMPOSER_AUTOLOAD_FILENAME === $file->getFilename()) { $this->assertContains('AppModule\\\\Module\\\\Bundle\\\\TestBundle\\\\', $file->getContents()); } if (static::COMPOSER_AUTOLOAD_CHILD_FILENAME === $file->getFilename()) { $this->assertContains('Symfony\\\\Component\\\\Yaml\\\\', $file->getContents()); } } }
/** * Test the method move files */ public function testMoveFile() { Accessible::setPropertyValue($this->autoregister, 'manipulator', $this->manipulator); $this->autoregister->moveFile($this->event); Phake::verify($this->manipulator)->moveAutoloadPsr4(); }