for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the WPFoundation library.
*
* Copyright (c) 2015-present LIN3S <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace spec\LIN3S\WPFoundation\Configuration\Translations;
use LIN3S\WordPressPhpSpecBridge\ObjectBehavior;
/**
* Spec of Translations class.
* @author Beñat Espiña <[email protected]>
class TranslationsSpec extends ObjectBehavior
{
function it_is_initializable()
$this->shouldHaveType('LIN3S\WPFoundation\Configuration\Translations\Translations');
}
function it_implements_translations_interface()
$this->shouldHaveType('LIN3S\WPFoundation\Configuration\Translations\TranslationsInterface');
function it_trans_when_the_WPML_is_not_installed()
$this->trans('dummy-key')->shouldReturn('dummy-key');
function it_trans_returns_translation()
include_once __DIR__ . '/../../../../../vendor/lin3s/wp-phpspec-brigde/src/LIN3S/WordPressPhpSpecBridge/Wpml.php';
$this->trans('dummy-key')->shouldReturn('translation of dummy-key');