assertEquals('application/pdf; charset=binary', $finfo->buffer($pdf)); } public function testInValidPdfMime() { $pdf = file_get_contents(base_path('/tests/Unit/Phantom/invalid.pdf')); $finfo = new \finfo(FILEINFO_MIME); $this->assertNotEquals('application/pdf; charset=binary', $finfo->buffer($pdf)); } }