techguy92

Experience

1,470

0 Best Reply Awards

  • Member Since 8 Months Ago
  • 12 Lessons Completed
  • 0 Favorites

11th May, 2018

techguy92 left a reply on Function Used By __construct($val) Not Being Mocked • 5 months ago

I'm going to make a test Object that extends the original object to test the other functions, by prepopulate the origin data.

techguy92 started a new conversation Function In __construct($val) Not Being Mocked • 5 months ago

I'm new to Testing and mocking. I need help on how to mock particular functions in my __construct class for one of my objects. These functions pull data from a database and return values to populate object properties.

Here is what I have

$testResponse = (object)[
            'name' => 'LISD TEST Event',
            'description' => 'LISD Test Event',
            'beginDate' => '2018-05-04',
            'orgCode' => '014',
        ];

        $event = Mockery::mock(Event::class, [self::TEST_EVENT_ID])->makePartial();
        $event->shouldAllowMockingProtectedMethods();
        $event->shouldReceive('getCampusName')
            ->with('014')
            ->atLeast(1)
            ->andReturn('LHS Harmon');
        $event->shouldReceive('getEventInformation')
            ->with(self::TEST_EVENT_ID)
            ->atLeast(1)
            ->andReturn($testObject);

But instead of mocking the functions, I get the data from the database and not the data from my $testResponse. Am I doing this all wrong or what am I missing to get this to retrieve the data from the mocked functions instead of the pulling from the actual database

6th April, 2018

techguy92 left a reply on Vue's Best Practices For Separation • 6 months ago

bump

27th March, 2018

techguy92 started a new conversation Best Practices For Separation • 6 months ago

Is there any particular reason or a best business practice recommendation on if or when should one should separate their <template> or <style> to their own files rather than keep them with their respected .vue file

13th February, 2018

techguy92 started a new conversation BBP For Routes • 8 months ago

What is the best way to write Routes? With a closure or directing towards a controller

8th February, 2018

techguy92 left a reply on Mailable: Using 0 Possible Authenticators • 8 months ago

@bobbybouwmann, you are correct. Sorry I posted that really quick and had to do something else. I selected your answer as the correct one. the configuration was wrong.

7th February, 2018

techguy92 left a reply on Mailable: Using 0 Possible Authenticators • 8 months ago

We figured it out. The configuration I was given was incorrect. Supposedly I was trying to be too secure for my own e-mail server. nulled username, password, and encryption and it worked just fine

6th February, 2018

techguy92 left a reply on Mailable: Using 0 Possible Authenticators • 8 months ago

@bobbybouwmann, I'm positive the credentials are correct

5th February, 2018

techguy92 left a reply on Mailable: Using 0 Possible Authenticators • 8 months ago

@bobbybouwmann it is a valid SMTP host. My question is how to set up authenticators because it comes back with "Unable to validate user: using 0 authenticators

2nd February, 2018

techguy92 left a reply on Mailable: Using 0 Possible Authenticators • 8 months ago

This is my mail config in my .env

MAIL_DRIVER=smtp
MAIL_HOST=o365relay.lisd.local
MAIL_PORT=25
[email protected]
MAIL_PASSWORD=myPassword
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME=Logan

changed some of the information for security purposes

techguy92 started a new conversation Mailable: Using 0 Possible Authenticators • 8 months ago

How do you set up authenticators for SMTP Mailable?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.