public function moreThanTenTags() { $this->setExpectedException('Exception', 'No more than 10 tags are allowed'); $tags = []; for ($i = 0; $i < 11; $i++) { $tags[] = ['Key' => "Key{$i}", 'Value' => "Value{$i}"]; } Validator::validateTags($tags); }