test/snac/server/ServerTest.php
/**
     * Tests to ensure that the server outputs JSON when given no input
     */
Tests to ensure that the server outputs JSON when given no input
Tests to ensure that the server outputs JSON when given no input
public function testJSONOutEmpty() {
        try {
            $server = new Server(null);
            $server->run();
            $this->assertNotNull(json_decode($server->getResponse()));
        } catch (\snac\exceptions\SNACInputException $e) {
        }
        try {
            $server = new Server(array());
            $server->run();
            $this->assertNotNull(json_decode($server->getResponse()));
        } catch (\snac\exceptions\SNACInputException $e) {
        }
    }
public function testJSONOutEmpty ( ) { try { $ server = new Server ( null ) ; $ server -> run ( ) ; $ this -> assertNotNull ( json_decode ( $ server -> getResponse ( ) ) ) ; } catch ( \ snac \ exceptions \ SNACInputException $ e ) { } try { $ server = new Server ( array ( ) ) ; $ server -> run ( ) ; $ this -> assertNotNull ( json_decode ( $ server -> getResponse ( ) ) ) ; } catch ( \ snac \ exceptions \ SNACInputException $ e ) { } }
Tests to ensure that the server outputs JSON when given no input
Tests to ensure that the server outputs JSON when given no input
// this is good // this is good