Exemplo n.º 1
0
 /**
  * @expectedException Exception
  * @expectedExceptionMessage No connection from 'model_1' to 'foobar'
  */
 public function testInvalidJoin()
 {
     Model1::selection(['foobar.foo' => 'a']);
 }
Exemplo n.º 2
0
 /**
  * @depends testSelection
  */
 public function testMultipleOr()
 {
     $date = date('Y-m-d H:i:s');
     $models = [Blueprint::make('Model1', ['str1' => "or_test_multiple", 'timestamp1' => $date]), Blueprint::make('Model1', ['int1' => 5715, 'timestamp1' => $date])];
     $res = Model1::selection(["@or" => ['str1' => "or_test_multiple", 'int1' => 5715], "@or:banana" => ["timestamp1" => $date]]);
     $this->assertCount(2, $res);
 }