From 90adb46816c91160b64901eab8924ab78107ba2e Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: 2017年1月16日 20:30:23 +0200 Subject: [PATCH 1/3] Show php info in build --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 230e422..fdaeda9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,8 @@ before_install: - sudo add-apt-repository ppa:pinepain/libv8-${V8} -y - sudo apt-get update -q - sudo apt-get install -y libv8-${V8}-dev + - php -i + - php-config || true before_script: - echo 'variables_order = "EGPCS"'>> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini From b82f1756f4aabaddb1d95a285c1a6c33cfd15cae Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: 2017年1月16日 19:51:01 +0200 Subject: [PATCH 2/3] Fix argument types in tests --- tests/V8Int32Value.phpt | 2 +- tests/V8IntegerValue.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/V8Int32Value.phpt b/tests/V8Int32Value.phpt index abeb074..d2be188 100644 --- a/tests/V8Int32Value.phpt +++ b/tests/V8Int32Value.phpt @@ -54,7 +54,7 @@ $helper->space(); $helper->header('Test negative value in constructor'); -$value = new V8\Int32Value($isolate, -123.456); +$value = new V8\Int32Value($isolate, -123); $helper->method_export($value, 'Value'); $helper->method_export($value, 'BooleanValue', [$context]); $helper->method_export($value, 'NumberValue', [$context]); diff --git a/tests/V8IntegerValue.phpt b/tests/V8IntegerValue.phpt index 48dfe5b..29964c2 100644 --- a/tests/V8IntegerValue.phpt +++ b/tests/V8IntegerValue.phpt @@ -54,7 +54,7 @@ $helper->space(); $helper->header('Test negative value in constructor'); -$value = new V8\IntegerValue($isolate, -123.456); +$value = new V8\IntegerValue($isolate, -123); $helper->method_export($value, 'Value'); $helper->method_export($value, 'BooleanValue', [$context]); $helper->method_export($value, 'NumberValue', [$context]); From 6e242135a6801a0dccb04fbe99d53e2d1e37a0e9 Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: 2017年1月16日 20:28:43 +0200 Subject: [PATCH 3/3] Remove mb_stlen() invocation as mbstring is not always available by default --- tests/V8StringValue.phpt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/V8StringValue.phpt b/tests/V8StringValue.phpt index 93db112..0e44a52 100644 --- a/tests/V8StringValue.phpt +++ b/tests/V8StringValue.phpt @@ -13,7 +13,6 @@ $v8_helper = new PhpV8Helpers($helper); // Tests: - $isolate = new V8\Isolate(); $default = new V8\StringValue($isolate); @@ -87,7 +86,6 @@ foreach (['Hello, world!', 'Привет, мир!', 'こんにちは世界'] as $helper->method_export($value, 'ContainsOnlyOneByte'); $helper->function_export('strlen', [$value->Value()]); - $helper->function_export('mb_strlen', [$value->Value()]); $helper->space(); } @@ -207,7 +205,6 @@ V8\StringValue->Utf8Length(): int(13) V8\StringValue->IsOneByte(): bool(true) V8\StringValue->ContainsOnlyOneByte(): bool(true) strlen(): 13 -mb_strlen(): 13 V8\StringValue->Value(): string(21) "Привет, мир!" @@ -216,7 +213,6 @@ V8\StringValue->Utf8Length(): int(21) V8\StringValue->IsOneByte(): bool(false) V8\StringValue->ContainsOnlyOneByte(): bool(false) strlen(): 21 -mb_strlen(): 12 V8\StringValue->Value(): string(21) "こんにちは世界" @@ -225,4 +221,3 @@ V8\StringValue->Utf8Length(): int(21) V8\StringValue->IsOneByte(): bool(false) V8\StringValue->ContainsOnlyOneByte(): bool(false) strlen(): 21 -mb_strlen(): 7

AltStyle によって変換されたページ (->オリジナル) /