Пример #1
0
    /**
     * Test controller when type is invalid
     */
    public function testInvalidType(){
        $builder = $this->buildData();
        $this->simulateLogin('*****@*****.**');
        $_GET["pid"] = '1001';
        $_GET["t"] = 'notavalidtype';

        $controller = new MapController(true);
        $results = $controller->go();

        $this->assertPattern("/This post has not been geoencoded yet; cannot display map./", $results);
    }
Пример #2
0
 /**
  * Test controller when type is invalid
  */
 public function testControlInvalidType()
 {
     $builder = $this->testInstantiateFixtureBuilder();
     $this->simulateLogin('*****@*****.**');
     $_GET["pid"] = '1001';
     $_GET["t"] = 'notavalidtype';
     $controller = new MapController(true);
     $results = $controller->go();
     $this->assertTrue(strpos($results, "No visualization data found for this post") > 0, "no post");
 }
Пример #3
0
 *
 * Copyright (c) 2009-2010 Gina Trapani
 *
 * LICENSE:
 *
 * This file is part of ThinkUp (http://thinkupapp.com).
 *
 * ThinkUp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any
 * later version.
 *
 * ThinkUp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with ThinkUp.  If not, see
 * <http://www.gnu.org/licenses/>.
 *
 *
 * @author Gina Trapani <ginatrapani[at]gmail[dot]com>
 * @license http://www.gnu.org/licenses/gpl.html
 * @copyright 2009-2010 Gina Trapani
 */
chdir('..');
chdir('..');
require_once 'init.php';
require_once 'plugins/geoencoder/controller/class.MapController.php';

$controller = new MapController();
echo $controller->go();
Пример #4
0
 /**
  * Test controller when type is invalid
  */
 public function testInvalidType()
 {
     $builder = $this->buildData();
     $this->simulateLogin('*****@*****.**');
     $_GET["pid"] = '1001';
     $_GET["t"] = 'notavalidtype';
     $controller = new MapController(true);
     $results = $controller->go();
     $this->assertPattern("/No visualization data found for this post/", $results);
 }