protected function fillWithData() { $foos = ['First Foo', 'Second Foo', 'Third Foo']; foreach ($foos as $foo) { Foo::create(['title' => $foo]); } $bazs = ['First Baz', 'Second Baz', 'Third Baz']; foreach ($bazs as $baz) { Baz::create(['title' => $baz]); } $bars = [['foo_id' => 1, 'baz_id' => 1, 'title' => 'First Foo First Baz Bar'], ['foo_id' => 1, 'baz_id' => 2, 'title' => 'First Foo Second Baz Bar']]; foreach ($bars as $bar) { Bar::create($bar); } $boms = [['bar_id' => 1, 'title' => 'First Bar Bom'], ['bar_id' => 2, 'title' => 'Second Bar Bom']]; foreach ($boms as $bom) { Bom::create($bom); } }
public function testCustomTableName() { $foo = Foo::create(['value' => 'Test']); $foo = Foo::findFirst(['conditions' => "value='Test'"]); $this->assertNotNull($foo); }
public function testCalledClass() { $foo = Foo::create(); $this->assertEquals('SingletonTest', $foo->called_by()); }
public function testRuleAppliesToStaticMethodAccess() { Foo::create(); }