diff --git a/tests/Exception/TestException.php b/tests/Exception/TestException.php index 12baeee5..7be980ae 100644 --- a/tests/Exception/TestException.php +++ b/tests/Exception/TestException.php @@ -8,8 +8,8 @@ class TestException extends \PHPUnit\Framework\TestCase { function setUp() { $this->clearData(false); - $m = $this->getMockBuilder(Lang::class)->setMethods(['__invoke'])->getMock(); - $m->expects($this->any())->method("__invoke")->with($this->anything(), $this->anything())->will($this->returnValue("")); + $m = $this->getMockBuilder(Lang::class)->setMethods(['msg'])->getMock(); + $m->expects($this->any())->method("msg")->with($this->anything(), $this->anything())->will($this->returnValue("")); Data::$l = $m; } diff --git a/tests/lib/Lang/Setup.php b/tests/lib/Lang/Setup.php index e5e67f39..888c1291 100644 --- a/tests/lib/Lang/Setup.php +++ b/tests/lib/Lang/Setup.php @@ -36,8 +36,8 @@ trait Setup { $this->l = new Lang($this->path); // create a mock Lang object to keep exceptions from creating loops $this->clearData(false); - $m = $this->getMockBuilder(Lang::class)->setMethods(['__invoke'])->getMock(); - $m->expects($this->any())->method("__invoke")->with($this->anything(), $this->anything())->will($this->returnValue("")); + $m = $this->getMockBuilder(Lang::class)->setMethods(['msg'])->getMock(); + $m->expects($this->any())->method("msg")->with($this->anything(), $this->anything())->will($this->returnValue("")); Data::$l = $m; // call the additional setup method if it exists if(method_exists($this, "setUpSeries")) $this->setUpSeries();