public function testSecondaryMembership() { $products = $this->electronics->ProductsShowable(); $this->assertDOSEquals(array(array('URLSegment' => 'hdtv')), $products, 'Should initially contain only direct membership products'); $this->socks->ProductCategories()->add($this->electronics); $this->socks->write(); $products = $this->electronics->ProductsShowable(); $this->assertDOSEquals(array(array('URLSegment' => 'hdtv'), array('URLSegment' => 'socks')), $products, 'After adding a category via many-many to socks, that should show up as well'); }