/** * Test that a subset of fixtures is used in stead of those in root. Root is used as fallback. */ public function testSubset() { self::reset(); fFixture::setDatabase(fORMDatabase::retrieve()); $fixture = fFixture::create(FIXTURES_ROOT, array("users"), FIXTURES_ROOT . "/subset/"); // includes: subset/users.json and shops.json $fixture->build(); $shop = new Shop(1); $user = new User(1); $this->assertTrue($shop->exists()); $this->assertTrue($user->exists()); $this->assertEquals(1, $shop->buildUsers()->count()); $this->assertTrue($user->createShop()->exists()); // The user should be Lars Larsen and not Palle Pallesen $this->assertEquals("Lars Larsen", $user->getName()); }