assertEquals(base64_encode('value'), $encoder->encode('value')); } /** * Test encoder with MediaAsset */ public function testEncodeMediaAsset() { $encoder = new Base64Encoder(); $url = 'https://www.taotesting.com/wp-content/uploads/2014/09/oat-header-logo.png'; $asset = new MediaAsset(new HttpSource(), $url); $this->assertEquals(base64_encode(basename($url)), $encoder->encode($asset)); } }