Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/job-board.corals.io/vendor/stripe/stripe-php/tests/Stripe/Util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/job-board.corals.io/vendor/stripe/stripe-php/tests/Stripe/Util/DefaultLoggerTest.php
<?php

// Test in a slightly different namespace than usual. See comment on
// `error_log` below.
namespace Stripe\Util;

class UtilLoggerTest extends \Stripe\TestCase
{
    public function testDefaultLogger()
    {
        $logger = new DefaultLogger();
        $logger->error("message");

        global $lastMessage;
        $this->assertSame($lastMessage, "message");
    }
}

// This is a little terrible, but unfortunately there's no clean way to stub a
// call to `error_log`. Here we overwrite it so that we can get the last arguments
// that went to it. This is obviously bad, but luckily it's constrained to
// being just in \Stripe\Util (i.e. won't interfere with PHPUnit for example)
// and _just_ present when tests are running.
function error_log($message)
{
    global $lastMessage;
    $lastMessage = $message;
}

Spamworldpro Mini