Skip to content

Commit

Permalink
Minor changes after merge of #10:
Browse files Browse the repository at this point in the history
- Fixing make test for PHP
- composer.lock is intended to be in source control
- Platform-agnostic file separators
  • Loading branch information
sffc committed Jun 4, 2018
1 parent 0cad406 commit bfad4bc
Show file tree
Hide file tree
Showing 6 changed files with 1,486 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ shn.txt
samples/ruby/Gemfile.lock
.idea/
vendor/
composer.lock
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ matrix:
- 7.1
- 7.2
before_script:
# - cd clients/php # this line has to remove
- composer install
script:
- ./vendor/bin/phpunit --configuration clients/php/phpunit.xml
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MAKE=make
MVN=mvn
NPM=npm
RAKE=rake
PHPUNIT=./vendor/bin/phpunit --configuration clients/php/phpunit.xml
PHPUNIT=./vendor/bin/phpunit

training/target: $(wildcard training/src/**/*)
$(MVN) -f training/pom.xml -q compile
Expand Down Expand Up @@ -68,11 +68,11 @@ client-ruby: $(wildcard clients/ruby/**/*)
cd clients/ruby && $(BUNDLE) install --path vendor/bundle

client-php: $(wildcard clients/php/**/*)
cd clients/php && $(COMPOSER) install
$(COMPOSER) install

test: clients client-cpp client-js client-ruby client-php
cd clients/cpp && $(MAKE) test
cd clients/java && $(MVN) test
cd clients/js && $(NPM) test
cd clients/ruby && $(RAKE) test
$(PHPUNIT) test
$(PHPUNIT) --configuration clients/php/phpunit.xml
4 changes: 2 additions & 2 deletions clients/php/src/ZawgyiDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ final class ZawgyiDetector
public function __construct()
{
try {
$fileName = __DIR__ . '/../resources/zawgyiUnicodeModel.dat';
$fileName = join(DIRECTORY_SEPARATOR, [__DIR__, "..", "resources", "zawgyiUnicodeModel.dat"]);
// file open with read permission with binary format
$inStream = fopen($fileName, "rb") or die("Unable to open file!");
$inStream = fopen($fileName, "rb");

if ($inStream == null) {
// IO Exception
Expand Down
2 changes: 1 addition & 1 deletion clients/php/tests/ZawgyiDetectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function difficult_code_points()
/** @tests */
public function compatibility()
{
$fileName = __DIR__ . '/../resources/compatibility.tsv';
$fileName = join(DIRECTORY_SEPARATOR, [__DIR__, "..", "resources", "compatibility.tsv"]);
$row = 1;
if (($handle = fopen($fileName, "r")) !== FALSE) {
// omitting the length parameter by setting zero
Expand Down
Loading

0 comments on commit bfad4bc

Please sign in to comment.