/** * @test * @dataProvider mediaTypesWithAndWithoutParameters */ public function trimMediaTypeReturnsJustTheTypeAndSubTypeWithoutParameters($mediaType, $expectedResult) { $actualResult = MediaTypes::trimMediaType($mediaType); $this->assertSame($expectedResult, $actualResult); }
/** * Strips off any parameters from the given media type and returns just the type * and subtype in the format "type/subtype". * @see \TYPO3\Flow\Utility\MediaTypes::trimMediaType() * * @param string $rawMediaType The full media type, for example "application/json; charset=UTF-8" * @return string Just the type and subtype, for example "application/json" * @deprecated since Flow 2.1. Use \TYPO3\Flow\Utility\MediaTypes::trimMediaType() instead */ public static function trimMediaType($rawMediaType) { return MediaTypes::trimMediaType($rawMediaType); }