<commit_before><?php
    /**
    * @backupGlobals disabled
    * @backupStaticAttributes disabled
    */

    require_once "src/Stylist.php";

    $server = 'mysql:host=localhost:8889;dbname=hair_salon_test';
    $username = 'root';
    $password = '<PASSWORD>';
    $DB = new PDO($server, $username, $password);

    class StylistTest extends PHPUnit_Framework_TestCase {

        protected function tearDown() {
            Stylist::deleteAll();
        }

        function test_save() {

            // ARRANGE
            $id = null;
            $name = "<NAME>";
            $new_stylist_test = new Stylist($id, $name);
            $new_stylist_test->save();

            // ACT
            $result = $new_stylist_test::getAll();

            // ASSERT
            $this->assertEquals($new_stylist_test, $result[0]);

        }

    }

?><commit_msg>add passing test for getAll method<commit_after><?php
    /**
    * @backupGlobals disabled
    * @backupStaticAttributes disabled
    */

    require_once "src/Stylist.php";

    $server = 'mysql:host=localhost:8889;dbname=hair_salon_test';
    $username = 'root';
    $password = '<PASSWORD>';
    $DB = new PDO($server, $username, $password);

    class StylistTest extends PHPUnit_Framework_TestCase {

        protected function tearDown() {
            Stylist::deleteAll();
        }

        function test_save() {

            // ARRANGE
            $id = null;
            $name = "<NAME>";
            $new_stylist_test = new Stylist($id, $name);
            $new_stylist_test->save();

            // ACT
            $result = $new_stylist_test::getAll();

            // ASSERT
            $this->assertEquals($new_stylist_test, $result[0]);

        }

        function test_getAll() {

            // ARRANGE
                // ---- save a new stylist ----
            $id = null;
            $name_1 = "<NAME>";
            $new_stylist_1 = new Stylist($id, $name_1);
            $new_stylist_1->save();
                // ---- save another new stylist ----
            $name_2 = "<NAME>";
            $new_stylist_2 = new Stylist($id, $name_2);
            $new_stylist_2->save();

            // ACT
            $result = Stylist::getAll();

            // ASSERT
            $this->assertEquals([$new_stylist_1, $new_stylist_2], $result);


        }

    }

?>
{'fraction_non_alphanumeric': 0.14089935760171307, 'fraction_numerical': 0.008565310492505354, 'mean_word_length': 1.7417840375586855, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2320342', 'n_tokens_mistral': 727, 'n_tokens_neox': 696, 'n_words': 127}