Nelmio\Alice\Definition\PropertyBagTest::testIsCountable PHP Метод

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

public testIsCountable ( )
    public function testIsCountable()
    {
        $bag = new PropertyBag();
        $this->assertEquals(0, count($bag));
        $bag = $bag->with(new Property('foo', 'bar'));
        $this->assertEquals(1, count($bag));
        $bag = $bag->with(new Property('foo', 'baz'));
        $this->assertEquals(1, count($bag));
        $bag = $bag->with(new Property('ping', 'pong'));
        $this->assertEquals(2, count($bag));
    }