]>
git.agnieray.net Git - galette.git/blob - tests/Galette/Core/tests/units/PrintLogo.php
5e93aebd9096ecf9a31ff2a3a6a1b8d33621fe52
3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
10 * Copyright © 2017 The Galette Team
12 * This file is part of Galette (http://galette.tuxfamily.org).
14 * Galette is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
19 * Galette is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
28 * @package GaletteTests
30 * @author Johan Cwiklinski <johan@x-tnd.be>
31 * @copyright 2017 The Galette Team
32 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
34 * @link http://galette.tuxfamily.org
38 namespace Galette\Core\test\units
;
47 * @package GaletteTests
48 * @author Johan Cwiklinski <johan@x-tnd.be>
49 * @copyright 2017 The Galette Team
50 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
51 * @link http://galette.tuxfamily.org
54 class PrintLogo
extends atoum
61 * @param string $testMethod Method name
65 public function beforeTestMethod($testMethod)
68 $this->zdb
= new \Galette\Core\
Db();
73 * Test defaults after initialization
77 public function testDefaults()
81 $logo = new \Galette\Core\
PrintLogo();
82 $this->variable($logo->getDestDir())->isNull();
83 $this->variable($logo->getFileName())->isNull();
85 $expected_path = realpath(GALETTE_ROOT
. 'webroot/themes/default/images/galette.png');
86 $this->string($logo->getPath())->isIdenticalTo($expected_path);
88 $this->string($logo->getMime())->isIdenticalTo('image/png');
89 $this->string($logo->getFormat())->isIdenticalTo('png');
90 $this->boolean($logo->isCustom())->isFalse();