/** * @expectedException \CollectionType\Exception\InvalidTypeException * * @covers CollectionType\Map\MapAbstract::containsValue * @covers CollectionType\Map\MapAbstract::put * @covers CollectionType\Map\MapAbstract::__construct * @covers CollectionType\Common\ValueTypeTrait::validateValueForValueType */ public function testContainsValueForIncorrectValueType() { $key = 'key'; $value = 'value'; $this->dummyKeyType->isValid($key)->willReturn(true); $this->dummyValueType->isValid($value)->willReturn(true); $this->map->put($key, $value); $incorrect = 1; $this->dummyValueType->isValid($incorrect)->willReturn(false); $this->map->containsValue($incorrect); }