public function testBulkCompressShouldCompressUncompressedSizes()
 {
     $this->enable_compression_sizes(array('thumbnail'));
     $this->set_api_key('PNG123');
     $this->upload_image(dirname(__FILE__) . '/../fixtures/example-large.png');
     $this->enable_compression_sizes(array('thumbnail', 'medium'));
     media_bulk_action(self::$driver, 'tinypng_bulk_compress');
     $this->assertContains('Compressed 2 out of 2 sizes', self::$driver->findElement(WebDriverBy::cssSelector('td.tiny-compress-images'))->getText());
 }
예제 #2
0
function clear_uploads($driver)
{
    media_bulk_action($driver, 'delete');
}