Skip to content
Snippets Groups Projects
Select Git revision
  • dba7a0e1a6761916877fa9c2e64d7d9874b19e41
  • main default protected
  • v0.10
  • 0.10.6
  • 0.10.5
  • 0.10.4
  • 0.10.3
  • 0.10.2
  • 0.10.1
  • 0.10.0
  • 0.9.1
  • 0.9.0
12 results

PhpFileDumperTest.php

Blame
  • TestFunctions.php 2.77 KiB
    <?php
    
    use \WPDesk\Notice\Notice;
    use \WPDesk\Notice\PermanentDismissibleNotice;
    
    /**
     * Class TestFunctions
     */
    class TestFunctions extends WP_UnitTestCase
    {
    
        /**
         * Test WPDeskNotice function.
         */
        public function testWPDeskNotice()
        {
            $notice = wpdesk_notice('test function');
    
            $this->assertInstanceOf(Notice::class, $notice);
    
            $this->expectOutputString('<div class="notice notice-info"><p>test function</p></div>');
    
            $notice->showNotice();
        }
    
        /**
         * Test WPDeskNoticeInfo function.
         */
        public function testWPDeskNoticeInfo()
        {
            $notice = wpdesk_notice_info('test function');
    
            $this->assertInstanceOf(Notice::class, $notice);
    
            $this->expectOutputString('<div class="notice notice-info"><p>test function</p></div>');
    
            $notice->showNotice();
        }
    
        /**
         * Test WPDeskNoticeError function.
         */
        public function testWPDeskNoticeError()
        {
            $notice = wpdesk_notice_error('test function');
    
            $this->assertInstanceOf(Notice::class, $notice);
    
            $this->expectOutputString('<div class="notice notice-error"><p>test function</p></div>');
    
            $notice->showNotice();
        }
    
        /**
         * Test WPDeskNoticeWarning function.
         */
        public function testWPDeskNoticeWarning()
        {
            $notice = wpdesk_notice_warning('test function');
    
            $this->assertInstanceOf(Notice::class, $notice);
    
            $this->expectOutputString('<div class="notice notice-warning"><p>test function</p></div>');
    
            $notice->showNotice();
        }
    
        /**
         * Test WPDeskNoticeSuccess function.
         */