From fc3cd773ec4503a4a1101036707adf479a8b77f2 Mon Sep 17 00:00:00 2001 From: Ignacio Velazquez Date: Mon, 13 Apr 2015 12:31:59 +0200 Subject: [PATCH] Fixed callable check on addProvider --- Fixtures/FixtureManager.php | 2 +- Tests/Fixture/FixtureManagerTest.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Fixtures/FixtureManager.php b/Fixtures/FixtureManager.php index 9a0e337..f363cc0 100644 --- a/Fixtures/FixtureManager.php +++ b/Fixtures/FixtureManager.php @@ -283,7 +283,7 @@ protected function configureLoader(LoaderInterface $loader) $loader->setLogger($this->logger); } } - if (is_callable($loader, 'addProvider')) { // new in Alice 1.7.2 + if (is_callable(array($loader, 'addProvider'))) { // new in Alice 1.7.2 $loader->addProvider($this->providers); } else { // BC path $loader->setProviders($this->providers); diff --git a/Tests/Fixture/FixtureManagerTest.php b/Tests/Fixture/FixtureManagerTest.php index 49b785a..0a8be06 100644 --- a/Tests/Fixture/FixtureManagerTest.php +++ b/Tests/Fixture/FixtureManagerTest.php @@ -188,7 +188,6 @@ public function testProviders() ->with('yaml', 'en_EN')->will($this->returnValue($this->yamlLoaderMock)); $this->yamlLoaderMock->expects($this->once())->method('load')->will($this->returnValue(array())); - $this->yamlLoaderMock->expects($this->once())->method('setProviders'); $provider = function () { return "foobar";