/** * Test * * @return void * */ public function testDefaultMessage() { $el = new \Hivefive\CFlasher\CFlasher(); $set = $el->setMessage('info'); if ($set) { $res = $el->getMessage(); } $expMessage = "This is an info message"; $this->assertEquals($res['message'], $expMessage, "Get message missmatch"); }
// // Set the error reporting. // error_reporting(-1); // Report all type of errors ini_set('display_errors', 1); // Display all errors ini_set('output_buffering', 0); // Do not buffer outputs, write directly //include the autoloader to make test.php work require '../../../autoload.php'; // // Set up the test environment // $flasher = new \Hivefive\CFlasher\CFlasher(); $flasher->setMessage('info'); $flash = $flasher->getMessage(); ?> <body> <div style="max-width:500px; margin:0 auto;" class="<?php echo $flash['type']; ?> "> <?php echo $flash['message']; ?> </div> </body> </html>