public function test() { $build = new Patch64BitSupportTaskTestBuild(); $fixture = new TemporaryFileFixture($this, getenv('PHPBREW_FIXTURES_PHP_DIR') . '/' . $build->getVersion() . '/Makefile'); $fixture->setTemporaryDirectory($build->getSourceDirectory()); $fixture->withFile('Makefile', function ($self, $fixturePath) use($build) { $task = new Patch64BitSupportTask($self->logger, new OptionResult()); $task->patch($build); $self->assertFileEquals(getenv('PHPBREW_EXPECTED_PHP_DIR') . '/' . $build->getVersion() . '/Makefile', $fixturePath); }); }
public function test() { $build = new Apxs2PatchTaskTestBuild(); $makefileFixture = new TemporaryFileFixture($this, $build->getMakefileSourcePath()); $configureFixture = new TemporaryFileFixture($this, $build->getConfigureSourcePath()); $makefileFixture->setTemporaryDirectory($build->getSourceDirectory()); $configureFixture->setTemporaryDirectory($build->getSourceDirectory()); $makefileFixture->withFile('Makefile.global', function ($self, $makefileFixturePath) use($build, $configureFixture) { $configureFixture->withFile('configure', function ($self, $configureFixturePath) use($build, $makefileFixturePath) { $task = new Apxs2PatchTask($self->logger); $task->patch($build, new OptionResult()); $self->assertFileEquals(getenv('PHPBREW_EXPECTED_PHP_DIR') . '/5.5.19/Makefile.global', $makefileFixturePath); $self->assertFileEquals(getenv('PHPBREW_EXPECTED_PHP_DIR') . '/5.5.19/configure', $configureFixturePath); }); }); }