/** * @test * @expectedException \BadMethodCallException */ public function it_should_not_call_methods_on_the_proxy() { /** * * Expectation * */ App::clearResolvedInstance('app'); App::shouldReceive('make')->with('Elasticsearch')->andReturn(true); App::shouldReceive('make')->with('iverberk.larasearch.index', m::type('array'))->andReturn(true); /** * * Assertion * */ // Overrule the proxy defined in previous tests am::double('Husband', ['getProxy' => new Proxy(new Husband())]); // Call a non existing method \Husband::bogus('*'); }