for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dynamic\FoxyStripe\Test;
use Dynamic\FoxyStripe\Model\FoxyCart;
use Dynamic\FoxyStripe\Model\FoxyStripeSetting;
use SilverStripe\SiteConfig\SiteConfig;
class StoreSettingsTest extends FS_Test
{
/**
* @var bool
*/
protected static $use_draft_site = true;
* @throws \SilverStripe\ORM\ValidationException
public function setUp()
parent::setUp();
$siteConf = FoxyStripeSetting::current_foxystripe_setting();
$siteConf->StoreName = 'foxystripe';
'foxystripe'
string
SilverStripe\ORM\FieldType\DBVarchar
$StoreName
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
$siteConf->requireDefaultRecords();
$siteConf->write();
}
*
public function testStoreKey()
$pref = FoxyCart::getKeyPrefix();
$this->assertTrue(ctype_alnum($siteConf->StoreKey));
$this->assertEquals(strlen($siteConf->StoreKey), 60);
$this->assertEquals(substr($siteConf->StoreKey, 0, 6), $pref);
public function testStoreName()
$this->assertEquals($siteConf->StoreName, 'foxystripe');
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..