Bolt\Tests\Storage\StorageTest::testGetContentType PHP Method

testGetContentType() public method

The legacy getContentType method should be able to find contenttypes by key, slugified key, slug, slugified slug, singular slug, slugified singular slug, singular name and name.
public testGetContentType ( $contentType )
    public function testGetContentType($contentType)
    {
        /** @var \Bolt\Application */
        $app = $this->getApp();
        $app['config']->set('contenttypes/' . $contentType['key'], $contentType);
        // We should be able to retrieve $contentType when querying getContentType() for its key, slug, singular
        // slug, name and singular name
        foreach ($contentType as $key => $value) {
            $this->assertSame($contentType, $app['storage']->getContentType($value));
        }
    }