Ejemplo n.º 1
0
 /**
  * @test
  */
 public function it_can_search()
 {
     /**
      *
      * Set
      *
      */
     $query = m::mock('Menthol\\Flexible\\Query');
     /**
      *
      * Expectation
      *
      */
     $query->shouldReceive('execute')->andReturn('result');
     App::shouldReceive('make')->with('menthol.flexible.query', ['proxy' => $this->proxy, 'term' => '*', 'options' => ['option']])->once()->andReturn($query);
     /**
      *
      * Assertion
      *
      */
     $result = $this->proxy->search('*', ['option']);
     $this->assertEquals('result', $result);
 }