Exemplo n.º 1
0
 public function testEagerLoadingOption()
 {
     $category = new Category();
     $category->setName('Category 1');
     $category->setDesc('Category 1 desc');
     $category->save();
     $product = new Product();
     $product->setName('Product 1');
     $product->setPrice(100);
     $product->setIsActive(true);
     $product->setCategory($category);
     $product->setCreatedAt(time());
     $product->save();
     Product::disableLazyLoading();
     $this->assertFalse(Product::isLazyLoadingEnabled());
 }