CRUDlexTests\EntityDefinitionTest::testInvalidFieldNames PHP Method

testInvalidFieldNames() public method

    public function testInvalidFieldNames()
    {
        try {
            $this->definition->setFilter(['foo', 'bar']);
            $this->fail();
        } catch (\InvalidArgumentException $e) {
            $read = $e->getMessage();
            $expected = 'Invalid fields (foo, bar) in filter, valid ones are: id, created_at, updated_at, title, author, pages, release, library, secondLibrary, cover, price';
            $this->assertSame($expected, $read);
        }
    }