This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class B | |
| { | |
| public $name = 'akram'; | |
| } | |
| class A | |
| { | |
| private $b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Container | |
| { | |
| public function make($className){} | |
| public function register($className, $callback){} | |
| } | |
| // initialize the container and register some classes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| abstract class TestCase extends BaseTestCase{ | |
| public function mockPassportToken(): void | |
| { | |
| $factory = \Mockery::mock(PersonalAccessTokenFactory::class); | |
| $factory->shouldReceive('make')->with(\Mockery::any(), \Mockery::any(), \Mockery::any())->andReturn(new PersonalAccessTokenResult("123", "123")); | |
| app()->instance(PersonalAccessTokenFactory::class, $factory); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package app.com.datrios.activities; | |
| import android.databinding.DataBindingUtil; | |
| import android.os.Bundle; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.support.v7.widget.Toolbar; | |
| import com.jaeger.library.StatusBarUtil; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class UserUpdateTest extends TestCase | |
| { | |
| use DatabaseMigrations; | |
| public function test_user_can_update_profile() | |
| { | |
| Notification::fake(); | |
| Passport::actingAs($user = factory(User::class)->create()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class UserUpdateTest extends TestCase | |
| { | |
| public function setUp() | |
| { | |
| parent::setUp(); | |
| $this->migrate([ | |
| self::DATABASE_MIGRATIONS_USER, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| abstract class TestCase extends BaseTestCase | |
| { | |
| const DATABASE_MIGRATIONS_USER = "database/migrations/user"; | |
| /** | |
| * @param $path | |
| */ | |
| public function migrate($path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class CreateEventsTable extends Migration | |
| { | |
| public function up() | |
| { | |
| Schema::create('events', function (Blueprint $table) { | |
| // table columns | |
| $table->unsignedInteger('user_id'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class User { | |
| public function addNewMobile($mobile): UserMobile | |
| { | |
| User::where('mobile', $mobile)->where('status',self::STATUS_NOT_VERIFIED)->delete(); | |
| $this->activationCodes()->where('mobile', $mobile)->delete(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class MultipleMobileTest extends TestCase | |
| { | |
| public function test_user_can_add_new_mobile() | |
| { | |
| $unverifiedUser = $this->newUnverifiedUser([ | |
| 'mobile' => '970567940999' | |
| ]); |