Nelmio\Alice\FixtureBagTest::testWithersReturnNewModifiedInstance PHP Метод

testWithersReturnNewModifiedInstance() публичный Метод

    public function testWithersReturnNewModifiedInstance()
    {
        $fixture = new DummyFixture('foo');
        $bag = new FixtureBag();
        $newBag = $bag->with($fixture);
        $newBagEmptied = $newBag->without($fixture);
        $this->assertInstanceOf(FixtureBag::class, $newBag);
        $this->assertNotSame($newBag, $bag);
        $this->assertEquals(new FixtureBag(), $bag);
        $this->assertSameFixtures(['foo' => $fixture], $newBag);
        $this->assertEquals(new FixtureBag(), $newBagEmptied);
    }