tracks/php/exercises/binary/README.md in trackler-2.2.1.103 vs tracks/php/exercises/binary/README.md in trackler-2.2.1.104
- old
+ new
@@ -5,14 +5,16 @@
Implement binary to decimal conversion. Given a binary input
string, your program should produce a decimal output. The
program should handle invalid inputs.
## Note
+
- Implement the conversion yourself.
Do not use something else to perform the conversion for you.
## About Binary (Base-2)
+
Decimal is a base-10 system.
A number 23 in base 10 notation can be understood
as a linear combination of powers of 10:
@@ -26,19 +28,25 @@
Binary is similar, but uses powers of 2 rather than powers of 10.
So: `101 => 1*2^2 + 0*2^1 + 1*2^0 => 1*4 + 0*2 + 1*1 => 4 + 1 => 5 base 10`.
-## Making the Test Suite Pass
-1. Get [PHPUnit].
+## Running the tests
+1. Go to the root of your PHP exercise directory, which is `<EXERCISM_WORKSPACE>/php`.
+ To find the Exercism workspace run
+
+ % exercism debug | grep Workspace
+
+1. Get [PHPUnit] if you don't have it already.
+
% wget --no-check-certificate https://phar.phpunit.de/phpunit.phar
% chmod +x phpunit.phar
-2. Execute the tests for an assignment.
+2. Execute the tests:
- % phpunit.phar wordy/wordy_test.php
+ % ./phpunit.phar binary/binary_test.php
[PHPUnit]: http://phpunit.de
## Source