Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shawnyv's avatar
Level 14

Spark Registration Oddity ?

Hi all,

I'm in the process of writing some integration tests for my new Spark app.

The first one I wrote was to register a new user (I know this is already tested within the Spark framework, but I wanted to have it anyway).

I'm a little concerned with the test feedback I'm getting though - primarily, worried that it's exposing the registration credentials 'over the air' when there's no javascript in place. Here's the test, and the error it's providing:

 public function test_registration_works()
    {
        $name = 'Test Q Testerton';
        $this->dontSeeInDatabase('users',['name'=>$name]);
        $this->visit('/register');
        $this->type($name, 'name');
        $this->type('[email protected]', 'email');
        $this->type('password', 'password');
        $this->type('password', 'password_confirmation');
        $this->check('terms');
        $this->press('Register');
        $this->seePageIs('/home');
        $this->seeInDatabase('users',['name'=>$name]);
    }

And the feedback I'm getting from the failing test is:

 Test  tests/integration/AuthTest.php:test_registration_works
- Expected | + Actual
@@ @@
-'http://localhost/home'
+'http://localhost/register?email=test%40test.com&name=Test%20Q%20Testerton&password=password&password_confirmation=password&terms=on'

Am I wrong to be concerned? Can somebody help shed some light on this for me?

Thanks!

0 likes
2 replies
EventFellows's avatar
Level 16

the registration is handled with vue and what you are seeing is the post request that is made.

shawnyv's avatar
Level 14

That makes a lot more sense. Thanks!

Please or to participate in this conversation.