Make WordPress Core

Ticket #46043: 46043.patch

File 46043.patch, 1.0 KB (added by mukesh27, 7 years ago)

Updated Patch as suggested by @johnbillion

  • tests/phpunit/tests/functions/__return.php

     
     1<?php
     2
     3/**
     4 * Tests for __return_** set of functions
     5 *
     6 * Here for competence
     7 *
     8 * @group functions.php
     9 * @ticket #46043
     10 */
     11class TEST__Return extends WP_UnitTestCase {
     12
     13        public function test__return_true(){
     14                $this->assertTrue( __return_true() );
     15        }
     16
     17        public function test__return_false(){
     18                $this->assertFalse( __return_false() );
     19        }
     20
     21        public function test__return_zero(){
     22                $this->assertSame( 0, __return_zero() );
     23        }
     24
     25        public function test__return_empty_array(){
     26                $this->assertEquals( array(), __return_empty_array() );
     27        }
     28
     29        public function test__return_null(){
     30                $this->assertNull( __return_null() );
     31        }
     32
     33        public function test__return_empty_string(){
     34                $this->assertSame( '', __return_empty_string() );
     35        }
     36}