2
0
forked from Wavyzz/dolibarr

Fix phpunit

This commit is contained in:
Laurent Destailleur
2018-03-08 22:40:42 +01:00
parent 9f42e1b172
commit 3ad95e46c0
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ CREATE TABLE llx_oauth_token (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
service varchar(36), service varchar(36),
token text, -- token in serialize() format, of an object StdOAuth2Token of library phpoauth2 token text, -- token in serialize() format, of an object StdOAuth2Token of library phpoauth2
tokenstring text, -- token in json format '{ "access_token": "sk_test_cccc", "refresh_token": "rt_aaa", "token_type": "bearer", ..., "scope": "read_write" } tokenstring text, -- token in json format '{"access_token": "sk_test_cccc", "refresh_token": "rt_aaa", "token_type": "bearer", ..., "scope": "read_write"}
fk_user integer, fk_user integer,
fk_adherent integer, fk_adherent integer,
entity integer DEFAULT 1 entity integer DEFAULT 1

View File

@@ -163,10 +163,10 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase
$result=strpos($filecontent,'"'); $result=strpos($filecontent,'"');
if ($result) if ($result)
{ {
$result=! strpos($filecontent,'["'); $result=(! strpos($filecontent,'["') && ! strpos($filecontent,'{"'));
} }
print __METHOD__." Result for checking we don't have double quote = ".$result."\n"; print __METHOD__." Result for checking we don't have double quote = ".$result."\n";
$this->assertTrue($result===false, 'Found double quote that is not [" (used for json content) into '.$file.'. Bad.'); $this->assertTrue($result===false, 'Found double quote that is not [" neither {" (used for json content) into '.$file.'. Bad.');
$result=strpos($filecontent,'int('); $result=strpos($filecontent,'int(');
print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n"; print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n";